<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<title>소셜커머스 모음 :: Social Curator</title>
	<link href="{{ static_path.css }}/tiled.css" rel="stylesheet" type="text/css"></link>
	<script type="text/javascript" src="{{ static_path.js }}/jquery-1.7.min.js"></script>
</head>
<body>
	<div align="center">
	  <div align="left"  style="width:954px;"> 
			<!-- Header start-->
			<div class="header">
				<!-- Logo -->
				<div align="center" style="margin:20px 0px 10px 0px;"><img src="{{ static_path.images }}/logo.png"></div>					
				<!-- Top menu -->
				<div id="topmenu">
					<ul id="topmenu_navi">
						<li><a href="/today_coupon">오늘의 쿠폰</a></li>
						<li><a class="menu_on" href="/today_tiled">오늘의 쿠폰(타일)</a></li>
						<li><a href="/openapi">Open API</a></li>
					</ul>
					<form method="get">
					<div id="topmenu_search">
						<div style="float:left">
							<img src="{{ static_path.images }}/topmenu_magnify.png">
						</div>
						<input type="text" id="topmenu_search_box" name="keyword" value="{{keyword}}">
					</div>
					</form>
				</div>
			</div>
			<!-- Header end -->			
			<!-- Content start -->
			<div class="content">
				<div id="deal_list">
		    	</div>
		    	<div style="clear:both" />
		    	<div id="lastPostsLoader"></div>				    
		    </div>
			</div>			
			<!-- Content end -->		
			<!-- Bottom start -->		
			<div class="bottom">
				<img src="{{ static_path.images }}/bottom_line.png"><br>
				<div align="center">
				 	<b>Copyright © deprice4u 2011.</b><br>
					※ deprice4u는 상품에 직접 관여하지 않으며 상품 주문, 배송 및 환불의 의무와 책임은 각 판매업체에 있습니다.	
				</div>
			</div>
			<!-- Bottom end -->		
		</div>
	</div>

<script type="text/javascript">
 var big_list = new Array(
 {% for item in big_list %}					
 	new Array("{{item.link}}","{{item.photo_url}}","{{item.title}}"), 
 	{% endfor %}
 	new Array()
 );
 big_list.pop();
 
 var med_list = new Array(
 {% for item in med_list %}					
 	new Array("{{item.link}}","{{item.photo_url}}","{{item.title}}"), 
 	{% endfor %}
 	new Array()
 );
 med_list.pop();
 
 var small_list = new Array(
 {% for item in small_list %}					
 	new Array("{{item.link}}","{{item.photo_url}}","{{item.title}}"), 
 	{% endfor %}
 	new Array()
 );
 small_list.pop();
		
<!-- general information of items -->
/*
var big_list_length = big_list.length;
var med_list_length = med_list.length;
var small_list_length = small_list.length;*/
var num_of_items = big_list.length + med_list.length + small_list.length;

<!-- general information of image blocks -->
var blocks = new Array();
var num_of_mid_childs = 2;
var num_of_small_childs = 4;
var blocks_array_size =0;

$(document).ready(function(){

	setDIV();
});


function setDIV()
{	
	var rnd = 0;
	var cnt = 0;
	
	while(cnt < num_of_items)
	{
		rnd = randomRange(0,1);
		if(rnd == 0 && big_list.length > 0)
		{
			var item = big_list.shift();
			var data = "<div class=\"tiled_frame_big\"><a target=_blank' href='" + item[0] + "'><img class=\"tiled_image tiled_image_big\" onload=\"this.style.opacity=1\" src=\""+ item[1] +"\"></a></div>";			
			$("#deal_list").append(data);	
			cnt++;
		}
		else
		{	
			var data = "<div class=\"tiled_frame_mid\">";
			var ndata= "";
			var loop_count = 0;
			while(true)
			{
				if(med_list.length == 0 && small_list.length == 0)
				{
					break;
				}
			    rnd = randomRange(0,1);
			  
			  
				if(rnd == 0 && med_list.length > 0)
				{
						var item = med_list.shift();
						cnt++;
						ndata+= "<a target=_blank' href='" + item[0] + "'><img class='tiled_image tiled_image_mid' onload=\"this.style.opacity=1\" src='"+ item[1] +"'></a>";
						loop_count++;
	 			}
				else if(small_list.length > 0)
				{
					var subdata = "<div class=\"tiled_frame_small\">";
					for(j=0; j< 4; j++)
					{
						if(small_list.length ==  0)
						{
							break;
						}
						
						var item = small_list.shift();
						cnt++;
						subdata+=  "<a target=_blank' href='" + item[0] + "'><img class='tiled_image tiled_image_small' onload=\"this.style.opacity=1\" src='"+ item[1] +"'></a>";
				  }
				  	
					subdata += "</div>";
					ndata += subdata;
					loop_count++;
				}
				
				if(loop_count == 2)
				{
					break;
				}
			}
		    data += ndata;		  
			data += "</div>";	
			if(loop_count > 0)
			{
				$("#deal_list").append(data);		
			}
		}
		
		$(".tiled_image_big").css('-webkit-transition-delay', "1s");	
		$(".tiled_image_mid").css('-webkit-transition-delay', "2s");	
		$(".tiled_image_small").css('-webkit-transition-delay', "3s");	
	}
		
}

	function randomRange(n1, n2) {
		return Math.floor( (Math.random() * (n2 - n1 + 1)) + n1 );
	}
	
	</script>
	
	<!-- Google Adsense -->	
	<div id="ScrollMenu" style="position:absolute; left:1316.5px; top:130px; width:160px; z-index:1; height: 600px;">
	<script type="text/javascript"><!--
google_ad_client = "ca-pub-4117634760413699";
/* deprice4u */
google_ad_slot = "1097098886";
google_ad_width = 160;
google_ad_height = 600;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
			
	</div>
	<script language=javascript>
		   <!--
				var yScrollThumb;
				var yMenuTop;
				
				function CheckMenuPosition()
				{
				  yScrollThumb = 970 + (document.body.clientWidth-970) /2;
				  
				  if (yScrollThumb != ScrollMenu.style.left)
				  {
				    ScrollMenu.style.left = yScrollThumb;
				  }
				  yScrollThumb = document.body.scrollTop + 40;
				  yMenuTop = parseInt ( ScrollMenu.style.top, 10); 
				
				  if ( yMenuTop == yScrollThumb) 
				  { 
				    TimeOutInterval = 500;
				  }
				  else
				  {
				    yMenuTop = ( yMenuTop + yScrollThumb) / 2;
				
				    if ( 130 >= yMenuTop)
				    {
				      ScrollMenu.style.top = 130;
				      TimeOutInterval = 500;
				   }
				    else
				    {
				      ScrollMenu.style.top = yMenuTop;
				      TimeOutInterval = 10; 
				     }
				  }
				  setTimeout ("CheckMenuPosition()", TimeOutInterval);
				}
				
				function OnLoad()
				{
				  CheckMenuPosition();
				  return true;
				}
				OnLoad();
		  //-->
		  </script>
	<!-- Google Adsense -->	
</body>